<template>
  <div id="app">
<!--    <router-link to="/login" tag="p">测试</router-link>-->
<!--    <router-link :to="{path:'/list'}">列表页</router-link>-->

    <router-view></router-view>

      <!--底部组件-->
    <AppTabBar v-show="showBar"></AppTabBar>

  </div>
</template>

<script>

import AppTabBar from "./components/AppTabBar";


export default {
  name: 'App',
  components: {
    AppTabBar
  },
  data(){
    return {
      showBar:true

    }
  },
  methods:{
    reder(name){
      // this.$router.push(path)
      // this.$router.push({path:path, query:{username:"yanziliang"}})
      this.$router.push({name:name, params:{username:"params"}})

    },
    goback(){
      this.$router.go(-1)
    },




  },
  watch:{
    $route(){
      //this.$router.go(0)
      if (this.$route.path === "/detail" || this.$route.path === "/basket"){
        this.showBar = false
      }else {
        this.showBar = true
      }
    }
  }
  ,
  created() {

  }

}
</script>

<style>
*{
  padding: 0;
  margin: 0;
}

#app {
  font-size: 12px;
}

</style>
